package com.congee02.springframework.beans.factory.config;

import com.congee02.springframework.beans.BeansException;
import com.congee02.springframework.beans.factory.ConfigurableListableBeanFactory;

/*
 * Factory hook that allows for custom modification of an application context's
 * bean definitions, adapting the bean property values of the context's underlying
 * bean factory.
 *
 * 工厂的一个钩子，允许对应用上下文 bean 定义的自定义修改，对容器全局生效。
 *
 */
public interface BeanFactoryPostProcessor {

    /**
     * Modify the application context's internal bean factory after its standard
     * initialization. All bean definitions will have been loaded, but no beans
     * will have been instantiated yet. This allows for overriding or adding
     * properties even to eager-initializing beans.
     * @param beanFactory the bean factory used by the application context
     * @throws BeansException in case of errors
     *
     * 在应用文标准初始化前，修改应用上下文内部的 bean 工厂。在所有 BeanDefinition
     *
     */
    void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException;

}
